<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
var CheckPermutation = function(s1, s2) {
    return s1.split('').sort().toString() === s2.split('').sort().toString()
};

// 直接数组sort比较转化后的字符串是否一致

var s1 = "asvnpzurz"

var s2 = "urzsapzvn"
console.log(CheckPermutation(s1, s2))
    </script>
</body>
</html>